from multiprocessing import Process
import time
class myProcess(Process):
    def __init__(self, name):
        super(myProcess, self).__init__()
        self.name = name
    def run(self):
        print('进程名称 :' + self.name)
        time.sleep(1)
        print("欢迎来到我们的世界：" + self.name)

if __name__ == '__main__':
    for i in range(5):
        p = myProcess("进程" + str(i))
        p.start()
    for i in range(5):
        p.join()
